package com.dycx.message.dto;

import com.dycx.common.dto.FieldsDTO;
import com.dycx.common.dto.PageDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
public class TemplateDTO extends PageDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Integer id;

    @NotNull(message = "消息类型不能为空")
    private Integer messageType;

    @NotBlank(message = "模板名称不能为空")
    private String name;

    @NotBlank(message = "模板code不能为空")
    private String code;

    @NotNull(message = "模板数据不能为空")
    private List<FieldsDTO> fields;

    @NotBlank(message = "模板消息内容不能为空")
    private String content;

    private Integer sort;

    private Boolean status;
}
